package com.itfreer.power.entity.role;

import java.util.HashSet;
import java.util.Set;

import com.itfreer.form.dictionary.reflect.DictionaryField;
import com.itfreer.power.entity.base.EntityBase;

/**
 * 定义角色实体类
 */
public class RoleEntity extends EntityBase {
	
	private static final long serialVersionUID = -3994919371092668844L;
	
	/**
	 * 分组
	 */
	private String groupName;
	
	/**
	 * 是否是用户注册时的默认角色
	 * 只应用于用户注册接口
	 */
	private Boolean isUserRegisterDefulatRole;
	
	/**
	 * 当用户没有挂角色时，默认挂此角色
	 */
	private Boolean isUserDefulatRole;
	
	/**
	 * 应用服务授权特有角色
	 * 应用于通过接口授权可访问指定应用时，注册或取消此角色
	 */
	@DictionaryField(dictionaryName="p_register_service", toFieldName="registerServiceName")
	private String registerService;
	
	/**
	 * 应用服务授权特有角色
	 * 应用于通过接口授权可访问指定应用时，注册或取消此角色
	 */
	private String registerServiceName;

	/**
	 * 菜单权限
	 */
	private Set<RoleMenuJurisdictionEntity> menus = new HashSet<RoleMenuJurisdictionEntity>();
	
	/**
	 * 数据权限
	 */
	private Set<RoleDataJurisdictionEntity> datas = new HashSet<RoleDataJurisdictionEntity>();
	
	/**
	 * 图层权限
	 */
	private Set<RoleMapLayerJurisdictionEntity> mapLayers = new HashSet<RoleMapLayerJurisdictionEntity>();
	
	/**
	 * 地图范围
	 */
	private Set<RoleMapExtentJurisdictionEntity> mapExtents = new HashSet<RoleMapExtentJurisdictionEntity>();
	
	/**
	 * 所属应用
	 */
	private Set<RoleServiceJurisdictionEntity> services = new HashSet<RoleServiceJurisdictionEntity>();
	
	public String getGroupName() {
		return groupName;
	}

	public void setGroupName(String groupName) {
		this.groupName = groupName;
	}

	public Set<RoleMenuJurisdictionEntity> getMenus() {
		return menus;
	}

	public void setMenus(Set<RoleMenuJurisdictionEntity> menus) {
		this.menus = menus;
	}

	public Set<RoleDataJurisdictionEntity> getDatas() {
		return datas;
	}

	public void setDatas(Set<RoleDataJurisdictionEntity> datas) {
		this.datas = datas;
	}

	public Set<RoleMapLayerJurisdictionEntity> getMapLayers() {
		return mapLayers;
	}

	public void setMapLayers(Set<RoleMapLayerJurisdictionEntity> mapLayers) {
		this.mapLayers = mapLayers;
	}

	public Set<RoleMapExtentJurisdictionEntity> getMapExtents() {
		return mapExtents;
	}

	public void setMapExtents(Set<RoleMapExtentJurisdictionEntity> mapExtents) {
		this.mapExtents = mapExtents;
	}

	public Set<RoleServiceJurisdictionEntity> getServices() {
		return services;
	}

	public void setServices(Set<RoleServiceJurisdictionEntity> services) {
		this.services = services;
	}

	public Boolean getIsUserRegisterDefulatRole() {
		return isUserRegisterDefulatRole;
	}

	public void setIsUserRegisterDefulatRole(Boolean isUserRegisterDefulatRole) {
		this.isUserRegisterDefulatRole = isUserRegisterDefulatRole;
	}

	public Boolean getIsUserDefulatRole() {
		return isUserDefulatRole;
	}

	public void setIsUserDefulatRole(Boolean isUserDefulatRole) {
		this.isUserDefulatRole = isUserDefulatRole;
	}

	public String getRegisterService() {
		return registerService;
	}

	public void setRegisterService(String registerService) {
		this.registerService = registerService;
	}

	public String getRegisterServiceName() {
		return registerServiceName;
	}

	public void setRegisterServiceName(String registerServiceName) {
		this.registerServiceName = registerServiceName;
	}
}
